﻿using System;
using System.Collections.Generic;
using DistributeTransaction.DAL;
using DistributeTransaction.Models;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Microsoft.VisualStudio.TestTools.UnitTesting.Web;

namespace DistributeTransaction.Tests
{
    
    
    /// <summary>
    ///This is a test class for ShoppingCartRepositoryTest and is intended
    ///to contain all ShoppingCartRepositoryTest Unit Tests
    ///</summary>
    [TestClass()]
    public class ShoppingCartRepositoryTest
    {


        private TestContext testContextInstance;

        /// <summary>
        ///Gets or sets the test context which provides
        ///information about and functionality for the current test run.
        ///</summary>
        public TestContext TestContext
        {
            get
            {
                return testContextInstance;
            }
            set
            {
                testContextInstance = value;
            }
        }

        #region Additional test attributes
        // 
        //You can use the following additional attributes as you write your tests:
        //
        //Use ClassInitialize to run code before running the first test in the class
        //[ClassInitialize()]
        //public static void MyClassInitialize(TestContext testContext)
        //{
        //}
        //
        //Use ClassCleanup to run code after all tests in a class have run
        //[ClassCleanup()]
        //public static void MyClassCleanup()
        //{
        //}
        //
        //Use TestInitialize to run code before running each test
        //[TestInitialize()]
        //public void MyTestInitialize()
        //{
        //}
        //
        //Use TestCleanup to run code after each test has run
        //[TestCleanup()]
        //public void MyTestCleanup()
        //{
        //}
        //
        #endregion


        /// <summary>
        ///A test for ShoppingCartRepository Constructor
        ///</summary>
        // TODO: Ensure that the UrlToTest attribute specifies a URL to an ASP.NET page (for example,
        // http://.../Default.aspx). This is necessary for the unit test to be executed on the web server,
        // whether you are testing a page, web service, or a WCF service.
        [TestMethod()]
        [HostType("ASP.NET")]
        [UrlToTest("http://localhost:12483")]
        public void ShoppingCartRepositoryConstructorTest()
        {
            DatabaseContext context = null; // TODO: Initialize to an appropriate value
            ShoppingCartRepository target = new ShoppingCartRepository(context);
            Assert.Inconclusive("TODO: Implement code to verify target");
        }

        /// <summary>
        ///A test for EmptyCart
        ///</summary>
        // TODO: Ensure that the UrlToTest attribute specifies a URL to an ASP.NET page (for example,
        // http://.../Default.aspx). This is necessary for the unit test to be executed on the web server,
        // whether you are testing a page, web service, or a WCF service.
        [TestMethod()]
        [HostType("ASP.NET")]
        [UrlToTest("http://localhost:12483")]
        public void EmptyCartTest()
        {
            DatabaseContext context = null; // TODO: Initialize to an appropriate value
            ShoppingCartRepository target = new ShoppingCartRepository(context); // TODO: Initialize to an appropriate value
            Guid userId = new Guid(); // TODO: Initialize to an appropriate value
            target.EmptyCart(userId);
            Assert.Inconclusive("A method that does not return a value cannot be verified.");
        }

        /// <summary>
        ///A test for GetShoppingCart
        ///</summary>
        // TODO: Ensure that the UrlToTest attribute specifies a URL to an ASP.NET page (for example,
        // http://.../Default.aspx). This is necessary for the unit test to be executed on the web server,
        // whether you are testing a page, web service, or a WCF service.
        [TestMethod()]
        [HostType("ASP.NET")]
        [UrlToTest("http://localhost:12483")]
        public void GetShoppingCartTest()
        {
            DatabaseContext context = null; // TODO: Initialize to an appropriate value
            ShoppingCartRepository target = new ShoppingCartRepository(context); // TODO: Initialize to an appropriate value
            Guid userId = new Guid(); // TODO: Initialize to an appropriate value
            IEnumerable<ShoppingCart> expected = null; // TODO: Initialize to an appropriate value
            IEnumerable<ShoppingCart> actual;
            actual = target.GetShoppingCart(userId);
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///A test for Insert
        ///</summary>
        // TODO: Ensure that the UrlToTest attribute specifies a URL to an ASP.NET page (for example,
        // http://.../Default.aspx). This is necessary for the unit test to be executed on the web server,
        // whether you are testing a page, web service, or a WCF service.
        [TestMethod()]
        [HostType("ASP.NET")]
        [UrlToTest("http://localhost:12483")]
        [DeploymentItem("DistributeTransaction.dll")]
        public void InsertTest()
        {
            PrivateObject param0 = null; // TODO: Initialize to an appropriate value
            ShoppingCartRepository_Accessor target = new ShoppingCartRepository_Accessor(param0); // TODO: Initialize to an appropriate value
            ShoppingCart entity = null; // TODO: Initialize to an appropriate value
            target.Insert(entity);
            Assert.Inconclusive("A method that does not return a value cannot be verified.");
        }

        /// <summary>
        ///A test for Remove
        ///</summary>
        // TODO: Ensure that the UrlToTest attribute specifies a URL to an ASP.NET page (for example,
        // http://.../Default.aspx). This is necessary for the unit test to be executed on the web server,
        // whether you are testing a page, web service, or a WCF service.
        [TestMethod()]
        [HostType("ASP.NET")]
        [UrlToTest("http://localhost:12483")]
        public void RemoveTest()
        {
            DatabaseContext context = null; // TODO: Initialize to an appropriate value
            ShoppingCartRepository target = new ShoppingCartRepository(context); // TODO: Initialize to an appropriate value
            Guid userId = new Guid(); // TODO: Initialize to an appropriate value
            int productId = 0; // TODO: Initialize to an appropriate value
            target.Remove(userId, productId);
            Assert.Inconclusive("A method that does not return a value cannot be verified.");
        }

        /// <summary>
        ///A test for Update
        ///</summary>
        // TODO: Ensure that the UrlToTest attribute specifies a URL to an ASP.NET page (for example,
        // http://.../Default.aspx). This is necessary for the unit test to be executed on the web server,
        // whether you are testing a page, web service, or a WCF service.
        [TestMethod()]
        [HostType("ASP.NET")]
        [UrlToTest("http://localhost:12483")]
        [DeploymentItem("DistributeTransaction.dll")]
        public void UpdateTest()
        {
            PrivateObject param0 = null; // TODO: Initialize to an appropriate value
            ShoppingCartRepository_Accessor target = new ShoppingCartRepository_Accessor(param0); // TODO: Initialize to an appropriate value
            ShoppingCart entity = null; // TODO: Initialize to an appropriate value
            target.Update(entity);
            Assert.Inconclusive("A method that does not return a value cannot be verified.");
        }

        /// <summary>
        ///A test for UpdateShoppingCart
        ///</summary>
        // TODO: Ensure that the UrlToTest attribute specifies a URL to an ASP.NET page (for example,
        // http://.../Default.aspx). This is necessary for the unit test to be executed on the web server,
        // whether you are testing a page, web service, or a WCF service.
        [TestMethod()]
        [HostType("ASP.NET")]
        [UrlToTest("http://localhost:12483")]
        public void UpdateShoppingCartTest()
        {
            DatabaseContext context = null; // TODO: Initialize to an appropriate value
            ShoppingCartRepository target = new ShoppingCartRepository(context); // TODO: Initialize to an appropriate value
            IEnumerable<int> productIds = null; // TODO: Initialize to an appropriate value
            Guid userId = new Guid(); // TODO: Initialize to an appropriate value
            target.UpdateShoppingCart(productIds, userId);
            Assert.Inconclusive("A method that does not return a value cannot be verified.");
        }
    }
}
